#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
#include<algorithm>
#include<string>

using namespace std;

class Solution {
public:
    int myAtoi(string str) {
        long long num = 0; int begin = 0, size = str.size(), sign = 1;

        for (begin = 0; begin < size; begin++)
        {
            if (sign * num > INT_MAX)
                return INT_MAX;
            if (sign * num < INT_MIN)
                return INT_MIN;

            if (str[begin] == '-' && num == 0)
                sign = -1;

            if (str[begin] < '0' || str[begin]>'9')
            {

                if (begin > 0 && str[begin - 1] >= '0' && str[begin - 1] <= '9')
                    return num * sign;
                else if (str[begin] != ' ' && str[begin] != '-' && str[begin] != '+')
                    return num * sign;
                else if (str[begin] != ' ')
                {
                    if (begin > 0 && (str[begin - 1] == '-' || str[begin - 1] == '+'))
                        return num * sign;
                    else if (begin + 1 < size && (str[begin + 1] < '0' || str[begin + 1]>'9'))
                        return num * sign;
                }
            }

            if (str[begin] >= '0' && str[begin] <= '9')
                num = num * 10 + (str[begin] - '0');
        }
        if (sign * num > INT_MAX)
            return INT_MAX;
        if (sign * num < INT_MIN)
            return INT_MIN;

        return num * sign;
    }

    bool isPalindrome(string s) {
        int begin = 0, size = s.size(), end = size - 1;
        while (begin <= end)
        {
            while (begin < size && (s[begin] < 'a' || s[begin]>'z') && (s[begin] < 'A' || s[begin]>'Z') && (s[begin] > '9' || s[begin] < '0'))
                begin++;
            while (end >= 0 && (s[end] < 'a' || s[end]>'z') && (s[end] < 'A' || s[end]>'Z') && (s[end] > '9' || s[end] < '0'))
                end--;
            if (begin >= end)
                break;
            if ((s[begin] <= 'Z') && (s[begin] >= 'A'))
            {
                if ((s[end] <= 'Z') && (s[end] >= 'A'))
                {
                    if (s[begin] != s[end])
                        return false;
                }
                else if (s[end] - 'a' != s[begin] - 'A')
                    return false;
            }
            else if ((s[begin] <= 'z') && (s[begin] >= 'a'))
            {
                if ((s[end] <= 'Z') && (s[end] >= 'A'))
                {
                    if (s[begin] - 'a' != s[end] - 'A')
                        return false;
                }
                else if (s[end] != s[begin])
                    return false;
            }
            else if (s[begin] >= '0' && s[begin] <= '9' && s[begin] != s[end])
                return false;
            ++begin;
            --end;
        }
        return true;
    }

    int firstUniqChar(string s) {
        int arr[26], size = s.size();
        for (int i = 0; i < 26; i++)
        {
            arr[i] = 0;
        }
        for (int i = 0; i < size; i++)
        {
            ++arr[s[i] - 'a'];
        }
        for (int i = 0; i < size; i++)
        {
            if (arr[s[i] - 'a'] == 1)
                return i;
        }
        return -1;
    }

    string addStrings(string num1, string num2) {
        string num;
        num.reserve(max(num1.size(), num2.size()));
        int end1 = num1.size() - 1, end2 = num2.size() - 1, k = 0, tmp = 0;
        while (end1 >= 0 || end2 >= 0)
        {
            if (end1 >= 0 && end2 >= 0)
                tmp = (num1[end1] - '0') + (num2[end2] - '0') + k;
            else if (end1 < 0)
                tmp = num2[end2] - '0' + k;
            else if (end2 < 0)
                tmp = num1[end1] - '0' + k;
            k = tmp / 10;
            num.push_back(tmp % 10 + '0');
            end1--;
            end2--;
        }
        if (k != 0)
            num.push_back(k + '0');
        int begin = 0, end = num.size() - 1;
        while (begin <= end)
        {
            char t = num[begin];
            num[begin] = num[end];
            num[end] = t;
            begin++;
            end--;
        }
        return num;
    }

    string reverseStr(string s, int k) {
        int pos = 0, enpos = pos + k, size = s.size();
        while (pos <= size)
        {
            if (size - pos >= k)
                enpos = pos + k - 1;
            else if (size - pos < k)
            {
                enpos = size - 1;
            }
            int begin = pos, end = enpos;
            while (begin <= end)
            {
                char tmp = s[begin];
                s[begin] = s[end];
                s[end] = tmp;
                begin++;
                end--;
            }
            pos += 2 * k;
        }
        return s;
    }

    string reverseWords(string s) {
        int begin = 0, end = 0, size = s.size();
        while (begin < size)
        {
            if (s[begin] == ' ')
                begin++;
            else
            {
                end = begin;
                while (end < size && s[end] != ' ')
                    end++;
                int en = end;
                --end;
                while (begin <= end)
                {
                    char tmp = s[begin];
                    s[begin] = s[end];
                    s[end] = tmp;
                    begin++;
                    end--;
                }
                begin = en;
                end = begin;
            }

        }
        return s;
    }

    string multiply(string num1, string num2) {
        string Mnum("");
        int sign = num1.size() > num2.size() ? 1 : 2;
        string mul1 = sign == 1 ? num2 : num1;
        string mul2 = sign == 1 ? num1 : num2;
        int pcur1 = 0;
        while (pcur1 < mul1.size())
        {
            int mul = mul1[pcur1] - '0';
            while (mul > 0)
            {
                Mnum = addStrings(Mnum, mul2);
                mul--;
            }
            pcur1++;
            if(pcur1<mul1.size())
                Mnum += '0';
        }
        return Mnum;
    }
};

int main()
{
    string b("20000");
    string c("3");
    Solution a;
    b = a.multiply(b, c);
    cout << b << endl;

    return 0;
}